import ObservableObject from "../observer/observable.object"
import AnimatedNumber from "./AnimatedNumber"
import * as THREE from "three"
import Matrix from "../three/Matrix"
export default class CameraTransition extends ObservableObject {
  startTime: number
  duration: number
  active: boolean
  type: any
  progress: AnimatedNumber
  blackoutProgress: AnimatedNumber
  from: { position: THREE.Vector3; rotation: THREE.Quaternion; projection: Matrix; focalDistance?: any }
  to: { position: THREE.Vector3; rotation: THREE.Quaternion; projection: Matrix; focalDistance?: any }
  rotationDelay: number
  rotationDuration: number
  matrixDelay: number
  matrixDuration: number
  activeInternal: boolean
  promise: any
  constructor() {
    super()
    this.startTime = 0
    this.duration = 0
    this.active = !1
    this.type = null
    this.progress = new AnimatedNumber(0)
    this.blackoutProgress = new AnimatedNumber(0)
    this.from = {
      position: new THREE.Vector3(),
      rotation: new THREE.Quaternion(),
      projection: new Matrix()
    }
    this.to = {
      position: new THREE.Vector3(),
      rotation: new THREE.Quaternion(),
      projection: new Matrix()
    }
    this.rotationDelay = 0
    this.rotationDuration = 1
    this.matrixDelay = 0
    this.matrixDuration = 1
    this.activeInternal = !1
    this.promise = null
  }
}
